#!/bin/bash

export LD_LIBRARY_PATH=build/src/lib:build/src/wx:$LD_LIBRARY_PATH
if [ "$1" == "--debug" ]; then
    gdb --args build/src/tools/dcpomatic2_server
elif [ "$1" == "--valgrind" ]; then
    valgrind --tool="memcheck" build/src/tools/dcpomatic2_server
else
    build/src/tools/dcpomatic2_server
fi
